package com.visizen.wisdomclass.server.client;

import com.visizen.wisdomclass.server.model.WcTopic;
import com.visizen.wisdomclass.server.model.WcTopicExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface WcTopicMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_topic
     *
     * @mbggenerated
     */
    @SelectProvider(type=WcTopicSqlProvider.class, method="countByExample")
    int countByExample(WcTopicExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_topic
     *
     * @mbggenerated
     */
    @DeleteProvider(type=WcTopicSqlProvider.class, method="deleteByExample")
    int deleteByExample(WcTopicExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_topic
     *
     * @mbggenerated
     */
    @Delete({
        "delete from wc_topic",
        "where topic_id = #{topic_id,jdbcType=BIGINT}"
    })
    int deleteByPrimaryKey(Long topic_id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_topic
     *
     * @mbggenerated
     */
    @Insert({
        "insert into wc_topic (topic_id, attach_id, ",
        "name, desc)",
        "values (#{topic_id,jdbcType=BIGINT}, #{attach_id,jdbcType=BIGINT}, ",
        "#{name,jdbcType=VARCHAR}, #{desc,jdbcType=LONGVARCHAR})"
    })
    int insert(WcTopic record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_topic
     *
     * @mbggenerated
     */
    @InsertProvider(type=WcTopicSqlProvider.class, method="insertSelective")
    int insertSelective(WcTopic record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_topic
     *
     * @mbggenerated
     */
    @SelectProvider(type=WcTopicSqlProvider.class, method="selectByExampleWithBLOBs")
    @Results({
        @Result(column="topic_id", property="topic_id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="attach_id", property="attach_id", jdbcType=JdbcType.BIGINT),
        @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
        @Result(column="desc", property="desc", jdbcType=JdbcType.LONGVARCHAR)
    })
    List<WcTopic> selectByExampleWithBLOBs(WcTopicExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_topic
     *
     * @mbggenerated
     */
    @SelectProvider(type=WcTopicSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="topic_id", property="topic_id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="attach_id", property="attach_id", jdbcType=JdbcType.BIGINT),
        @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR)
    })
    List<WcTopic> selectByExample(WcTopicExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_topic
     *
     * @mbggenerated
     */
    @Select({
        "select",
        "topic_id, attach_id, name, desc",
        "from wc_topic",
        "where topic_id = #{topic_id,jdbcType=BIGINT}"
    })
    @Results({
        @Result(column="topic_id", property="topic_id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="attach_id", property="attach_id", jdbcType=JdbcType.BIGINT),
        @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
        @Result(column="desc", property="desc", jdbcType=JdbcType.LONGVARCHAR)
    })
    WcTopic selectByPrimaryKey(Long topic_id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_topic
     *
     * @mbggenerated
     */
    @UpdateProvider(type=WcTopicSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") WcTopic record, @Param("example") WcTopicExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_topic
     *
     * @mbggenerated
     */
    @UpdateProvider(type=WcTopicSqlProvider.class, method="updateByExampleWithBLOBs")
    int updateByExampleWithBLOBs(@Param("record") WcTopic record, @Param("example") WcTopicExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_topic
     *
     * @mbggenerated
     */
    @UpdateProvider(type=WcTopicSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") WcTopic record, @Param("example") WcTopicExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_topic
     *
     * @mbggenerated
     */
    @UpdateProvider(type=WcTopicSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(WcTopic record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_topic
     *
     * @mbggenerated
     */
    @Update({
        "update wc_topic",
        "set attach_id = #{attach_id,jdbcType=BIGINT},",
          "name = #{name,jdbcType=VARCHAR},",
          "desc = #{desc,jdbcType=LONGVARCHAR}",
        "where topic_id = #{topic_id,jdbcType=BIGINT}"
    })
    int updateByPrimaryKeyWithBLOBs(WcTopic record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_topic
     *
     * @mbggenerated
     */
    @Update({
        "update wc_topic",
        "set attach_id = #{attach_id,jdbcType=BIGINT},",
          "name = #{name,jdbcType=VARCHAR}",
        "where topic_id = #{topic_id,jdbcType=BIGINT}"
    })
    int updateByPrimaryKey(WcTopic record);
}